package com.hunliji.monitor.web.controller.app;

import com.hunliji.common.response.ResponseData;
import com.hunliji.monitor.service.api.model.param.QueryUserParam;
import com.hunliji.monitor.web.facade.UserFacade;
import com.hunliji.monitor.web.model.vo.UserBasicInfoVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户
 * @author wuchen
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserFacade userFacade;

    /**
     * 查询用户
     * @param queryUserParam
     * @return
     */
    @PostMapping("/queryBasicList")
    public ResponseData<List<UserBasicInfoVO>> queryBasicList(@RequestBody QueryUserParam queryUserParam){
        //todo 先加到100
        queryUserParam.setPageSize(100);
        return ResponseData.success(userFacade.queryUserBasicList(queryUserParam));
    }
}
